home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Super PC 34
/
Super PC 34 (Shareware).iso
/
spc
/
UTIL
/
DJGPP2
/
V2
/
DJTST200.ZIP
/
tests
/
libc
/
go32
/
raise.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1995-09-06
|
326 b
|
24 lines
#include <stdio.h>
#include <signal.h>
void
sf(int x)
{
printf("FPU exception trapped!\n");
exit(1);
}
int
main(void)
{
if (signal(SIGFPE, sf) == SIG_ERR)
printf("cannot set signal handler\n");
printf("before the raise\n");
raise(SIGFPE);
printf("after the raise\n");
return 0;
}